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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.q: A = None
        self.t: D = None
        self.y: C = None
        self.o: A = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.u: E = None
        self.x: F = None
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: E = None
        self.w: F = None
        self.y: F = None
        self.x: D = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.z: F = None
        self.u: E = None
        self.r: J = None
        self.x: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.q: A = None
        self.t: D = None
        self.y: C = None
        self.o: A = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: E = None
        self.u: E = None
        self.x: F = None
        self.q: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: E = None
        self.w: F = None
        self.y: F = None
        self.x: D = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.z: F = None
        self.u: E = None
        self.r: J = None
        self.x: J = None
        self.txt = txt

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

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

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