class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.y: G = None
        self.r: B = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: G = None
        self.o: F = None
        self.x: I = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.v: D = None
        self.p: E = None
        self.o: B = None
        self.x: I = None
        self.w: I = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.r: H = None
        self.y: B = None
        self.u: H = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: C = None
        self.x: F = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: G = None
        self.o: F = None
        self.x: I = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.v: D = None
        self.p: E = None
        self.o: B = None
        self.x: I = None
        self.w: I = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.r: H = None
        self.y: B = None
        self.u: H = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: C = None
        self.x: F = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

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