class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: B = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: D = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

i = A("i")
k = B("k")
b = C("b")
g = D("g")
l = B("l")
n = C("n")
j = D("j")
c = B("c")
f = D("f")
e = B("e")

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: D = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

i = A("i")
k = B("k")
b = C("b")
g = D("g")
l = B("l")
n = C("n")
j = D("j")
c = B("c")
f = D("f")
e = B("e")

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