class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: C = None
        self.o: F = None
        self.x: G = None
        self.q: H = None
        self.r: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.u: B = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.u: B = None
        self.p: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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