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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: F = None
        self.q: C = None
        self.v: C = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: F = None
        self.q: C = None
        self.v: C = None
        self.o: G = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

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

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