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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: H = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.y: D = None
        self.v: D = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: H = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.y: D = None
        self.v: D = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

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