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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: F = None
        self.q: I = None
        self.t: D = None
        self.x: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.x: B = None
        self.q: I = None
        self.w: G = None
        self.z: I = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: B = None
        self.p: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: F = None
        self.q: I = None
        self.t: D = None
        self.x: G = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: I = None
        self.x: B = None
        self.q: I = None
        self.w: G = None
        self.z: I = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: B = None
        self.p: H = None
        self.txt = txt

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

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