class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: I = None
        self.p: A = None
        self.t: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.y: B = None
        self.x: H = None
        self.z: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.o: C = None
        self.t: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.o: B = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.r: D = None
        self.s: C = None
        self.t: A = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

i = A("i")
l = B("l")
f = C("f")
h = D("h")
d = E("d")
e = F("e")
j = G("j")
m = H("m")
a = I("a")
b = A("b")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.y: B = None
        self.x: H = None
        self.z: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: G = None
        self.o: C = None
        self.t: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.o: B = None
        self.y: E = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.r: D = None
        self.s: C = None
        self.t: A = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

i = A("i")
l = B("l")
f = C("f")
h = D("h")
d = E("d")
e = F("e")
j = G("j")
m = H("m")
a = I("a")
b = A("b")

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