class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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

e = A("e")
f = B("f")
m = C("m")
j = D("j")
k = B("k")
g = C("g")
b = B("b")
d = D("d")
a = A("a")
c = D("c")

e.o = d
e.u = m
e.t = g
f.v = b
f.x = b
m.p = b
m.t = d
j.x = e
j.u = f
j.w = a
k.v = f
k.x = f
g.p = f
g.t = j
b.v = k
b.x = k
d.x = e
d.w = e
d.u = b
a.o = c
a.u = g
a.t = g
c.x = a
c.w = a
c.u = b
assert b.v.v.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

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

e = A("e")
f = B("f")
m = C("m")
j = D("j")
k = B("k")
g = C("g")
b = B("b")
d = D("d")
a = A("a")
c = D("c")

e.o = d
e.u = m
e.t = g
f.v = b
f.x = b
m.p = b
m.t = d
j.x = e
j.u = f
j.w = a
k.v = f
k.x = f
g.p = f
g.t = j
b.v = k
b.x = k
d.x = e
d.w = e
d.u = b
a.o = c
a.u = g
a.t = g
c.x = a
c.w = a
c.u = b
assert b.v.v.v.x.txt == "k"