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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: G = None
        self.o: I = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.s: G = None
        self.w: F = None
        self.o: F = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: G = None
        self.o: I = None
        self.w: E = None
        self.u: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: C = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.s: G = None
        self.w: F = None
        self.o: F = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

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

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