class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.z: D = None
        self.r: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

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

c.x = g
c.r = g
c.s = j
c.z = f
b.o = c
b.q = g
b.u = d
b.s = j
d.x = f
d.t = f
d.q = m
d.u = b
f.r = b
f.q = g
f.v = j
f.z = a
l.o = g
l.q = g
l.u = m
l.s = b
m.x = f
m.t = f
m.q = d
m.u = b
a.x = f
a.t = f
a.q = m
a.u = b
g.x = c
g.r = c
g.s = l
g.z = f
j.o = c
j.q = c
j.u = a
j.s = b
assert c.z.v.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.z: D = None
        self.r: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: A = None
        self.v: B = None
        self.z: C = None
        self.txt = txt

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

c.x = g
c.r = g
c.s = j
c.z = f
b.o = c
b.q = g
b.u = d
b.s = j
d.x = f
d.t = f
d.q = m
d.u = b
f.r = b
f.q = g
f.v = j
f.z = a
l.o = g
l.q = g
l.u = m
l.s = b
m.x = f
m.t = f
m.q = d
m.u = b
a.x = f
a.t = f
a.q = m
a.u = b
g.x = c
g.r = c
g.s = l
g.z = f
j.o = c
j.q = c
j.u = a
j.s = b
assert c.z.v.u.u.txt == "b"