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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.o: C = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: G = None
        self.v: F = None
        self.x: B = None
        self.o: D = None
        self.p: B = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.x: C = None
        self.s: E = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: A = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.o: C = None
        self.u: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: G = None
        self.v: F = None
        self.x: B = None
        self.o: D = None
        self.p: B = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.x: C = None
        self.s: E = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: A = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

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

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