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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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