class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: F = None
        self.o: B = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: I = None
        self.q: H = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: H = None
        self.t: J = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: D = None
        self.y: H = None
        self.w: J = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.u: B = None
        self.z: I = None
        self.r: J = None
        self.w: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: I = None
        self.q: H = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: F = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: H = None
        self.t: J = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: D = None
        self.y: H = None
        self.w: J = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: E = None
        self.u: B = None
        self.z: I = None
        self.r: J = None
        self.w: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: D = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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