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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.o: A = None
        self.w: D = None
        self.p: A = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.u: D = None
        self.w: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.w: A = None
        self.t: E = None
        self.x: F = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: D = None
        self.o: A = None
        self.w: D = None
        self.p: A = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.u: D = None
        self.w: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.w: A = None
        self.t: E = None
        self.x: F = None
        self.p: F = None
        self.txt = txt

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

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

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