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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: J = None
        self.p: E = None
        self.u: A = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: B = None
        self.r: J = None
        self.t: B = None
        self.o: B = None
        self.u: B = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.w: E = None
        self.q: G = None
        self.r: D = None
        self.s: A = None
        self.y: C = None
        self.x: I = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.o: D = None
        self.t: H = None
        self.u: A = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: J = None
        self.p: E = None
        self.u: A = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: B = None
        self.r: J = None
        self.t: B = None
        self.o: B = None
        self.u: B = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: J = None
        self.w: E = None
        self.q: G = None
        self.r: D = None
        self.s: A = None
        self.y: C = None
        self.x: I = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.o: D = None
        self.t: H = None
        self.u: A = None
        self.y: B = None
        self.p: A = None
        self.txt = txt

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

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