class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.s: G = None
        self.w: C = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: F = None
        self.q: B = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.t: D = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.o: G = None
        self.z: E = None
        self.s: A = None
        self.u: A = None
        self.w: A = None
        self.r: G = None
        self.txt = txt

c = A("c")
h = B("h")
g = C("g")
a = D("a")
l = E("l")
d = F("d")
k = G("k")
f = H("f")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: H = None
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: F = None
        self.q: B = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.t: D = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.o: G = None
        self.z: E = None
        self.s: A = None
        self.u: A = None
        self.w: A = None
        self.r: G = None
        self.txt = txt

c = A("c")
h = B("h")
g = C("g")
a = D("a")
l = E("l")
d = F("d")
k = G("k")
f = H("f")

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