class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: A = None
        self.x: I = None
        self.r: B = None
        self.q: A = None
        self.y: A = None
        self.s: E = 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.x: A = None
        self.o: D = None
        self.s: F = None
        self.r: F = None
        self.u: G = None
        self.z: A = None
        self.q: I = None
        self.p: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: G = None
        self.u: F = None
        self.txt = txt

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

a.p = h
a.t = n
a.q = n
a.y = n
a.x = g
a.r = c
a.s = b
c.r = h
m.x = n
m.o = h
m.t = h
m.s = l
m.r = l
m.u = e
m.p = e
m.z = a
m.q = g
h.x = a
h.q = e
h.t = b
h.s = b
h.u = j
h.y = l
h.r = l
h.w = c
b.u = g
b.w = g
b.v = a
b.r = a
b.x = m
b.o = h
b.q = e
l.r = b
l.q = b
l.u = b
l.t = a
l.o = h
e.z = g
e.o = h
e.x = j
j.x = e
g.w = j
g.x = e
g.u = l
n.p = h
n.t = a
n.q = a
n.y = a
n.x = g
n.r = c
n.s = b
assert e.z.u.t.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: A = None
        self.x: I = None
        self.r: B = None
        self.q: A = None
        self.y: A = None
        self.s: E = 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.x: A = None
        self.o: D = None
        self.s: F = None
        self.r: F = None
        self.u: G = None
        self.z: A = None
        self.q: I = None
        self.p: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: G = None
        self.u: F = None
        self.txt = txt

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

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