class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: C = None
        self.u: C = None
        self.x: D = None
        self.t: E = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.v: I = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.p: D = None
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: E = None
        self.v: I = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.p: D = None
        self.u: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: D = None
        self.s: G = None
        self.txt = txt

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

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