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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: I = None
        self.q: C = None
        self.r: C = None
        self.t: A = None
        self.x: C = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: C = None
        self.r: H = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.q: E = None
        self.u: A = None
        self.z: E = None
        self.t: C = None
        self.y: B = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.y: F = None
        self.o: A = None
        self.s: H = None
        self.r: B = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: I = None
        self.q: C = None
        self.r: C = None
        self.t: A = None
        self.x: C = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: C = None
        self.r: H = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.q: E = None
        self.u: A = None
        self.z: E = None
        self.t: C = None
        self.y: B = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.y: F = None
        self.o: A = None
        self.s: H = None
        self.r: B = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

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

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