class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.v: C = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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