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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.u: G = None
        self.o: H = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: G = None
        self.o: G = None
        self.u: H = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.z: G = None
        self.q: A = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

f = A("f")
h = B("h")
l = C("l")
i = D("i")
j = E("j")
a = F("a")
n = G("n")
m = H("m")
c = G("c")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.u: G = None
        self.o: H = None
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: G = None
        self.o: G = None
        self.u: H = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.z: G = None
        self.q: A = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

f = A("f")
h = B("h")
l = C("l")
i = D("i")
j = E("j")
a = F("a")
n = G("n")
m = H("m")
c = G("c")

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