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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

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