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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: B = None
        self.s: F = None
        self.t: D = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

b.z = h
b.v = d
b.q = k
b.p = k
c.y = d
c.t = k
e.r = k
e.o = c
e.s = h
e.t = m
e.z = m
e.q = b
m.x = n
m.o = c
m.p = h
n.y = c
n.v = h
h.s = j
h.o = m
h.z = m
h.u = m
k.y = d
k.t = c
j.r = k
j.o = k
j.s = h
j.t = m
j.z = m
j.q = d
d.z = h
d.v = b
d.q = c
d.p = c
i.r = k
i.o = k
i.s = h
i.t = m
i.z = m
i.q = d
assert j.r.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: A = None
        self.q: B = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: B = None
        self.s: F = None
        self.t: D = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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