class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: F = None
        self.q: E = None
        self.v: C = None
        self.o: E = None
        self.z: D = None
        self.y: G = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.o: D = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: A = None
        self.p: E = None
        self.t: G = None
        self.x: D = None
        self.v: E = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
g = D("g")
d = E("d")
c = F("c")
i = G("i")
l = H("l")
b = D("b")
e = C("e")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: F = None
        self.q: E = None
        self.v: C = None
        self.o: E = None
        self.z: D = None
        self.y: G = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: F = None
        self.o: D = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: A = None
        self.p: E = None
        self.t: G = None
        self.x: D = None
        self.v: E = None
        self.txt = txt

j = A("j")
m = B("m")
n = C("n")
g = D("g")
d = E("d")
c = F("c")
i = G("i")
l = H("l")
b = D("b")
e = C("e")

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