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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.y: B = None
        self.r: C = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: D = None
        self.t: E = None
        self.txt = txt

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

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

d = A("d")
j = B("j")
c = C("c")
b = D("b")
l = E("l")
e = F("e")
i = D("i")
h = B("h")

d.t = i
d.q = b
d.y = l
j.z = e
j.v = h
j.y = h
j.r = c
j.x = c
j.s = c
c.t = l
c.y = i
c.z = h
c.u = h
b.s = c
b.q = i
b.t = l
l.q = c
l.y = h
l.t = i
l.v = b
e.v = c
e.z = c
i.s = c
i.q = b
i.t = l
h.z = e
h.v = j
h.y = j
h.r = c
h.x = c
h.s = c
assert h.z.z.y.q.q.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.y: B = None
        self.r: C = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: D = None
        self.t: E = None
        self.txt = txt

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

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

d = A("d")
j = B("j")
c = C("c")
b = D("b")
l = E("l")
e = F("e")
i = D("i")
h = B("h")

d.t = i
d.q = b
d.y = l
j.z = e
j.v = h
j.y = h
j.r = c
j.x = c
j.s = c
c.t = l
c.y = i
c.z = h
c.u = h
b.s = c
b.q = i
b.t = l
l.q = c
l.y = h
l.t = i
l.v = b
e.v = c
e.z = c
i.s = c
i.q = b
i.t = l
h.z = e
h.v = j
h.y = j
h.r = c
h.x = c
h.s = c
assert h.z.z.y.q.q.q.s.txt == "c"