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

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

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

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

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

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

m = A("m")
i = B("i")
h = C("h")
n = D("n")
g = E("g")
b = F("b")
e = A("e")
d = B("d")
k = C("k")
c = E("c")

m.u = g
m.v = g
m.t = b
m.s = n
i.w = h
i.u = e
i.q = c
h.r = b
h.y = b
h.p = n
n.u = g
n.o = b
g.p = n
g.z = k
g.t = c
g.s = m
g.x = d
b.x = i
e.u = c
e.t = b
e.s = n
e.v = g
d.w = h
d.u = m
d.q = c
k.r = b
k.y = b
k.p = n
c.p = n
c.z = k
c.t = g
c.s = m
c.x = i
assert i.w.r.x.u.v.t.p.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: D = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

m = A("m")
i = B("i")
h = C("h")
n = D("n")
g = E("g")
b = F("b")
e = A("e")
d = B("d")
k = C("k")
c = E("c")

m.u = g
m.v = g
m.t = b
m.s = n
i.w = h
i.u = e
i.q = c
h.r = b
h.y = b
h.p = n
n.u = g
n.o = b
g.p = n
g.z = k
g.t = c
g.s = m
g.x = d
b.x = i
e.u = c
e.t = b
e.s = n
e.v = g
d.w = h
d.u = m
d.q = c
k.r = b
k.y = b
k.p = n
c.p = n
c.z = k
c.t = g
c.s = m
c.x = i
assert i.w.r.x.u.v.t.p.o.x.txt == "i"