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

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

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

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

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

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

j = A("j")
l = B("l")
i = C("i")
k = D("k")
f = E("f")
c = F("c")
h = F("h")
m = A("m")
a = A("a")

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

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

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

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

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

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

j = A("j")
l = B("l")
i = C("i")
k = D("k")
f = E("f")
c = F("c")
h = F("h")
m = A("m")
a = A("a")

j.y = f
j.w = f
j.u = f
j.v = k
j.q = k
j.t = m
l.x = k
l.w = i
i.w = h
k.z = f
k.t = l
k.r = j
k.p = j
f.p = c
f.z = h
f.x = l
c.o = h
c.q = a
h.o = c
h.q = j
m.y = f
m.w = f
m.u = f
m.v = k
m.q = k
m.t = j
a.y = f
a.w = f
a.u = f
a.v = k
a.q = k
a.t = j
assert c.o.o.o.q.u.z.q.t.txt == "m"