class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.x: G = None
        self.y: A = None
        self.z: G = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.z: A = None
        self.r: D = None
        self.x: D = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.x: G = None
        self.y: A = None
        self.z: G = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: G = None
        self.z: A = None
        self.r: D = None
        self.x: D = None
        self.v: A = None
        self.txt = txt

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

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