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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.u: D = None
        self.txt = txt

a = A("a")
g = B("g")
j = C("j")
n = D("n")
m = E("m")
c = F("c")
d = F("d")
i = F("i")

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: E = None
        self.u: D = None
        self.txt = txt

a = A("a")
g = B("g")
j = C("j")
n = D("n")
m = E("m")
c = F("c")
d = F("d")
i = F("i")

a.r = j
a.v = j
a.o = j
a.q = n
a.s = g
g.w = a
g.u = n
j.r = n
j.s = n
j.y = c
j.o = m
n.p = m
n.t = g
n.o = a
n.u = c
n.x = d
m.q = g
c.o = g
c.w = m
c.u = n
d.o = g
d.w = m
d.u = n
i.o = g
i.w = m
i.u = n
assert c.o.u.t.u.txt == "n"