class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: D = None
        self.p: B = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

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

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

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

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

m.x = a
m.o = f
m.v = f
m.p = j
l.q = h
l.o = g
l.x = g
e.x = a
e.t = a
e.r = n
f.s = h
f.t = m
f.z = a
f.r = e
g.q = f
g.r = f
g.w = f
g.y = l
g.o = l
g.x = m
n.o = e
n.w = a
a.o = i
a.w = n
j.q = g
j.x = g
j.o = h
i.x = a
i.r = n
i.t = n
h.q = f
h.r = f
h.w = f
h.y = j
h.o = j
h.x = m
assert m.x.o.x.o.txt == "i"