class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: D = None
        self.y: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

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

i = A("i")
l = B("l")
n = C("n")
c = D("c")
j = E("j")
h = F("h")
k = E("k")
m = D("m")

i.u = k
i.r = m
i.y = n
i.v = n
l.r = n
l.o = n
l.q = i
l.w = k
n.o = l
c.r = i
c.t = h
c.s = m
j.s = l
j.u = n
j.x = n
j.y = i
h.x = l
k.s = l
k.u = n
k.x = n
k.y = i
m.r = i
m.t = h
m.s = c
assert c.s.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: D = None
        self.y: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

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

i = A("i")
l = B("l")
n = C("n")
c = D("c")
j = E("j")
h = F("h")
k = E("k")
m = D("m")

i.u = k
i.r = m
i.y = n
i.v = n
l.r = n
l.o = n
l.q = i
l.w = k
n.o = l
c.r = i
c.t = h
c.s = m
j.s = l
j.u = n
j.x = n
j.y = i
h.x = l
k.s = l
k.u = n
k.x = n
k.y = i
m.r = i
m.t = h
m.s = c
assert c.s.r.y.txt == "n"