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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.t: G = None
        self.q: J = None
        self.v: G = None
        self.r: H = None
        self.y: E = None
        self.z: J = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: F = None
        self.v: G = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

l = A("l")
c = B("c")
j = C("j")
n = D("n")
i = E("i")
e = F("e")
a = G("a")
f = H("f")
b = I("b")
m = J("m")

l.t = a
c.p = n
c.r = n
c.t = b
c.v = j
j.t = n
n.p = e
n.o = j
n.s = f
i.r = j
e.x = j
e.u = j
e.w = j
e.o = f
e.r = f
e.t = a
e.v = a
e.q = m
e.z = m
e.y = i
a.p = j
f.u = c
f.s = e
f.v = a
f.p = l
b.o = i
m.t = f
m.y = j
m.z = e
assert b.o.r.t.p.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: H = None
        self.t: G = None
        self.q: J = None
        self.v: G = None
        self.r: H = None
        self.y: E = None
        self.z: J = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: F = None
        self.v: G = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

l = A("l")
c = B("c")
j = C("j")
n = D("n")
i = E("i")
e = F("e")
a = G("a")
f = H("f")
b = I("b")
m = J("m")

l.t = a
c.p = n
c.r = n
c.t = b
c.v = j
j.t = n
n.p = e
n.o = j
n.s = f
i.r = j
e.x = j
e.u = j
e.w = j
e.o = f
e.r = f
e.t = a
e.v = a
e.q = m
e.z = m
e.y = i
a.p = j
f.u = c
f.s = e
f.v = a
f.p = l
b.o = i
m.t = f
m.y = j
m.z = e
assert b.o.r.t.p.o.u.txt == "c"