class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.s: D = None
        self.o: B = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.y: D = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

n = A("n")
l = B("l")
a = C("a")
f = D("f")
c = E("c")
m = F("m")
h = G("h")
k = F("k")

n.r = a
n.y = k
n.t = k
n.s = f
n.o = l
n.q = l
l.s = h
l.p = a
l.w = m
a.t = c
a.z = c
a.s = c
a.r = n
f.t = h
f.x = n
f.q = c
f.u = k
c.q = l
c.t = l
c.y = f
c.w = k
c.p = n
m.o = k
m.u = k
m.w = c
m.x = l
m.r = l
h.r = n
k.o = m
k.u = m
k.w = c
k.x = l
k.r = l
assert l.w.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: F = None
        self.s: D = None
        self.o: B = None
        self.t: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: B = None
        self.y: D = None
        self.w: F = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

n = A("n")
l = B("l")
a = C("a")
f = D("f")
c = E("c")
m = F("m")
h = G("h")
k = F("k")

n.r = a
n.y = k
n.t = k
n.s = f
n.o = l
n.q = l
l.s = h
l.p = a
l.w = m
a.t = c
a.z = c
a.s = c
a.r = n
f.t = h
f.x = n
f.q = c
f.u = k
c.q = l
c.t = l
c.y = f
c.w = k
c.p = n
m.o = k
m.u = k
m.w = c
m.x = l
m.r = l
h.r = n
k.o = m
k.u = m
k.w = c
k.x = l
k.r = l
assert l.w.u.x.txt == "l"