class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: B = None
        self.q: F = None
        self.s: F = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: A = None
        self.w: D = None
        self.v: A = None
        self.u: G = None
        self.o: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: A = None
        self.w: D = None
        self.v: A = None
        self.u: G = None
        self.o: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: B = None
        self.z: B = None
        self.q: B = None
        self.txt = txt

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

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