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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.t: F = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.y: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.p: J = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: J = None
        self.t: G = None
        self.z: A = None
        self.v: C = None
        self.p: F = None
        self.x: D = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.v: G = None
        self.y: F = None
        self.t: B = None
        self.u: B = None
        self.p: D = None
        self.r: B = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.t: F = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.y: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: J = None
        self.p: J = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: J = None
        self.t: G = None
        self.z: A = None
        self.v: C = None
        self.p: F = None
        self.x: D = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.v: G = None
        self.y: F = None
        self.t: B = None
        self.u: B = None
        self.p: D = None
        self.r: B = None
        self.x: J = None
        self.txt = txt

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

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

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