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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: I = None
        self.x: B = None
        self.r: G = None
        self.v: E = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: F = None
        self.o: C = None
        self.y: I = None
        self.x: D = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: E = None
        self.w: C = None
        self.o: C = None
        self.x: I = None
        self.u: F = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: I = None
        self.x: B = None
        self.r: G = None
        self.v: E = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: F = None
        self.o: C = None
        self.y: I = None
        self.x: D = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: E = None
        self.w: C = None
        self.o: C = None
        self.x: I = None
        self.u: F = None
        self.r: F = None
        self.txt = txt

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

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