class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.t: D = None
        self.y: G = None
        self.p: G = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.v: D = None
        self.s: C = None
        self.u: G = None
        self.q: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: E = None
        self.t: G = None
        self.z: C = None
        self.x: G = None
        self.txt = txt

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

n = A("n")
l = B("l")
h = C("h")
b = D("b")
c = E("c")
i = F("i")
j = G("j")
k = D("k")

n.u = k
n.v = k
n.t = b
n.y = j
n.p = j
n.z = i
n.x = i
l.o = i
h.r = c
h.z = j
b.o = c
b.q = c
b.z = c
b.y = j
b.u = j
b.v = k
b.s = h
c.r = k
c.t = n
i.y = k
i.p = c
i.t = j
i.x = j
i.z = h
j.x = c
j.p = h
k.o = c
k.q = c
k.z = c
k.y = j
k.u = j
k.v = b
k.s = h
assert j.p.z.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.t: D = None
        self.y: G = None
        self.p: G = None
        self.z: F = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.v: D = None
        self.s: C = None
        self.u: G = None
        self.q: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: E = None
        self.t: G = None
        self.z: C = None
        self.x: G = None
        self.txt = txt

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

n = A("n")
l = B("l")
h = C("h")
b = D("b")
c = E("c")
i = F("i")
j = G("j")
k = D("k")

n.u = k
n.v = k
n.t = b
n.y = j
n.p = j
n.z = i
n.x = i
l.o = i
h.r = c
h.z = j
b.o = c
b.q = c
b.z = c
b.y = j
b.u = j
b.v = k
b.s = h
c.r = k
c.t = n
i.y = k
i.p = c
i.t = j
i.x = j
i.z = h
j.x = c
j.p = h
k.o = c
k.q = c
k.z = c
k.y = j
k.u = j
k.v = b
k.s = h
assert j.p.z.p.txt == "h"