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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.t: E = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.y: C = None
        self.u: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.t: E = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.y: C = None
        self.u: E = None
        self.v: A = None
        self.txt = txt

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

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