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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.u: D = None
        self.x: C = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.txt = txt

j = A("j")
e = B("e")
k = C("k")
l = D("l")
i = E("i")
d = F("d")
m = D("m")

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.u: D = None
        self.x: C = None
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.txt = txt

j = A("j")
e = B("e")
k = C("k")
l = D("l")
i = E("i")
d = F("d")
m = D("m")

j.z = d
j.w = d
j.q = m
e.y = k
e.x = k
e.p = i
e.u = m
e.r = j
k.r = d
k.z = d
k.y = d
k.w = i
k.o = i
k.p = m
l.x = d
l.q = j
l.s = j
l.u = m
l.r = i
i.p = j
i.v = j
i.s = j
i.x = m
i.w = k
i.u = e
d.x = i
d.q = j
m.x = d
m.q = j
m.s = j
m.u = l
m.r = i
assert i.u.y.z.q.q.txt == "m"