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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.v: E = None
        self.txt = txt

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

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

g = A("g")
m = B("m")
c = C("c")
i = D("i")
j = E("j")
l = C("l")
b = E("b")

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.v: E = None
        self.txt = txt

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

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

g = A("g")
m = B("m")
c = C("c")
i = D("i")
j = E("j")
l = C("l")
b = E("b")

g.u = m
g.q = i
m.q = i
m.y = c
m.w = c
m.z = g
m.r = l
c.t = m
c.s = l
c.v = j
i.o = b
i.v = m
i.u = m
i.t = g
j.t = i
j.x = m
l.t = m
l.s = c
l.v = j
b.t = i
b.x = m
assert c.s.v.t.txt == "i"