class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.z: D = None
        self.r: B = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: E = None
        self.v: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: C = None
        self.v: A = None
        self.p: F = None
        self.o: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.o: E = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
a = D("a")
b = E("b")
k = F("k")
l = D("l")
m = F("m")
e = B("e")

f.x = d
f.w = e
f.r = e
f.z = l
f.o = b
c.x = b
c.y = b
c.v = d
c.s = a
d.v = c
a.t = f
a.v = f
a.y = d
b.t = d
b.r = d
b.o = d
b.v = f
b.p = m
b.y = e
k.x = d
k.u = d
k.v = a
k.o = b
k.s = f
l.t = f
l.v = f
l.y = d
m.x = d
m.u = d
m.v = l
m.o = b
m.s = f
e.x = b
e.y = b
e.v = d
e.s = a
assert d.v.s.v.r.v.v.v.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.z: D = None
        self.r: B = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: E = None
        self.v: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: A = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: C = None
        self.v: A = None
        self.p: F = None
        self.o: C = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.o: E = None
        self.u: C = None
        self.s: A = None
        self.txt = txt

f = A("f")
c = B("c")
d = C("d")
a = D("a")
b = E("b")
k = F("k")
l = D("l")
m = F("m")
e = B("e")

f.x = d
f.w = e
f.r = e
f.z = l
f.o = b
c.x = b
c.y = b
c.v = d
c.s = a
d.v = c
a.t = f
a.v = f
a.y = d
b.t = d
b.r = d
b.o = d
b.v = f
b.p = m
b.y = e
k.x = d
k.u = d
k.v = a
k.o = b
k.s = f
l.t = f
l.v = f
l.y = d
m.x = d
m.u = d
m.v = l
m.o = b
m.s = f
e.x = b
e.y = b
e.v = d
e.s = a
assert d.v.s.v.r.v.v.v.v.v.txt == "d"