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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

i = A("i")
j = B("j")
a = C("a")
l = D("l")
b = E("b")
m = F("m")
k = A("k")

i.r = l
i.t = k
j.t = a
j.v = b
j.q = b
a.s = j
a.q = k
a.o = l
a.r = m
l.r = k
l.v = j
l.y = m
b.u = l
m.p = j
m.o = b
m.z = a
m.s = l
k.r = l
k.t = i
assert j.t.o.y.s.y.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.z: C = None
        self.s: D = None
        self.txt = txt

i = A("i")
j = B("j")
a = C("a")
l = D("l")
b = E("b")
m = F("m")
k = A("k")

i.r = l
i.t = k
j.t = a
j.v = b
j.q = b
a.s = j
a.q = k
a.o = l
a.r = m
l.r = k
l.v = j
l.y = m
b.u = l
m.p = j
m.o = b
m.z = a
m.s = l
k.r = l
k.t = i
assert j.t.o.y.s.y.s.v.txt == "j"