class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.z: D = None
        self.o: C = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: B = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: C = None
        self.r: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: B = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: C = None
        self.r: E = None
        self.z: F = None
        self.txt = txt

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

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

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