class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.s: B = None
        self.w: E = None
        self.y: D = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.y: A = None
        self.t: A = None
        self.u: E = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.s: B = None
        self.w: E = None
        self.y: D = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: B = None
        self.y: A = None
        self.t: A = None
        self.u: E = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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