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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.z: E = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

d = A("d")
b = B("b")
n = C("n")
l = D("l")
m = E("m")
k = F("k")
i = A("i")
h = C("h")
c = B("c")

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.z: E = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

d = A("d")
b = B("b")
n = C("n")
l = D("l")
m = E("m")
k = F("k")
i = A("i")
h = C("h")
c = B("c")

d.u = n
d.y = i
d.t = l
d.z = l
d.w = m
b.p = k
n.z = i
n.q = m
n.x = m
n.p = l
l.p = i
l.s = i
l.z = m
l.q = n
l.v = d
m.w = d
m.z = c
m.p = k
m.r = k
m.o = l
m.s = i
k.y = m
k.z = c
k.v = l
i.u = n
i.y = d
i.t = l
i.z = l
i.w = m
h.z = d
h.q = m
h.x = m
h.p = l
c.p = k
assert k.y.w.u.z.u.z.txt == "i"