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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: A = None
        self.y: C = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.y: B = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

m = A("m")
n = B("n")
h = C("h")
b = D("b")
j = E("j")
g = F("g")
c = B("c")
a = E("a")
i = C("i")

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: A = None
        self.y: C = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.y: B = None
        self.t: C = None
        self.p: B = None
        self.txt = txt

m = A("m")
n = B("n")
h = C("h")
b = D("b")
j = E("j")
g = F("g")
c = B("c")
a = E("a")
i = C("i")

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