class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.q: E = None
        self.v: B = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

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

l.w = a
b.s = g
b.p = e
g.z = c
g.q = c
g.x = d
c.t = g
c.w = g
c.x = k
c.q = k
c.v = b
c.r = a
e.o = d
e.t = b
e.y = b
e.v = g
j.o = e
j.u = c
j.z = g
j.s = g
j.t = a
k.o = c
k.t = b
k.y = b
k.v = g
d.t = g
d.w = g
d.x = e
d.q = k
d.v = b
d.r = j
a.o = e
a.u = d
a.z = g
a.s = g
a.t = j
assert c.w.x.v.p.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: E = None
        self.q: E = None
        self.v: B = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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