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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.y: F = None
        self.r: E = None
        self.o: A = None
        self.x: E = None
        self.z: A = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
e = C("e")
g = D("g")
b = E("b")
k = F("k")
f = G("f")
m = E("m")

n.x = k
n.t = k
n.u = h
n.q = m
h.v = k
e.s = g
e.x = k
e.y = h
g.y = h
b.p = k
b.w = k
b.y = k
b.r = m
b.x = m
b.o = n
b.z = n
k.t = n
k.u = n
k.q = g
k.z = h
k.w = f
k.o = f
f.t = e
f.u = e
f.v = m
f.x = g
f.y = k
m.p = k
m.w = k
m.y = k
m.r = b
m.x = b
m.o = n
m.z = n
assert b.p.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: F = None
        self.y: F = None
        self.r: E = None
        self.o: A = None
        self.x: E = None
        self.z: A = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
e = C("e")
g = D("g")
b = E("b")
k = F("k")
f = G("f")
m = E("m")

n.x = k
n.t = k
n.u = h
n.q = m
h.v = k
e.s = g
e.x = k
e.y = h
g.y = h
b.p = k
b.w = k
b.y = k
b.r = m
b.x = m
b.o = n
b.z = n
k.t = n
k.u = n
k.q = g
k.z = h
k.w = f
k.o = f
f.t = e
f.u = e
f.v = m
f.x = g
f.y = k
m.p = k
m.w = k
m.y = k
m.r = b
m.x = b
m.o = n
m.z = n
assert b.p.w.y.txt == "k"