class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: A = None
        self.t: D = None
        self.r: H = None
        self.v: B = None
        self.y: E = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.o: A = None
        self.p: D = None
        self.w: H = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.r: E = None
        self.p: C = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.t: D = None
        self.s: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: A = None
        self.t: D = None
        self.r: H = None
        self.v: B = None
        self.y: E = None
        self.w: D = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.o: A = None
        self.p: D = None
        self.w: H = None
        self.v: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.r: E = None
        self.p: C = None
        self.o: E = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.t: D = None
        self.s: C = None
        self.z: G = None
        self.txt = txt

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

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