class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.v: F = None
        self.u: B = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.z: F = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

l.q = e
l.t = e
l.u = e
l.v = g
l.o = k
l.p = f
i.p = m
i.t = l
i.v = l
i.z = k
i.o = k
i.q = e
h.t = c
h.p = c
h.z = g
h.v = g
f.u = l
k.p = d
k.t = g
d.v = k
d.w = k
d.o = h
c.u = l
e.p = m
e.t = m
e.z = k
e.o = k
e.q = i
e.v = l
m.q = i
m.t = e
m.u = e
m.v = g
m.o = k
m.p = c
g.v = k
g.w = k
g.o = h
assert c.u.o.p.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.v: F = None
        self.u: B = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: D = None
        self.z: F = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

l.q = e
l.t = e
l.u = e
l.v = g
l.o = k
l.p = f
i.p = m
i.t = l
i.v = l
i.z = k
i.o = k
i.q = e
h.t = c
h.p = c
h.z = g
h.v = g
f.u = l
k.p = d
k.t = g
d.v = k
d.w = k
d.o = h
c.u = l
e.p = m
e.t = m
e.z = k
e.o = k
e.q = i
e.v = l
m.q = i
m.t = e
m.u = e
m.v = g
m.o = k
m.p = c
g.v = k
g.w = k
g.o = h
assert c.u.o.p.o.p.txt == "c"