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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: C = None
        self.p: D = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: G = None
        self.t: G = None
        self.z: C = None
        self.y: F = None
        self.u: I = None
        self.r: D = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: C = None
        self.p: D = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: G = None
        self.t: G = None
        self.z: C = None
        self.y: F = None
        self.u: I = None
        self.r: D = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

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