class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.p: F = None
        self.t: C = None
        self.x: C = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: I = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.s: H = None
        self.u: F = None
        self.r: G = None
        self.t: D = None
        self.x: F = None
        self.y: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.v: B = None
        self.y: I = None
        self.p: I = None
        self.s: E = None
        self.q: F = None
        self.o: A = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: F = None
        self.y: I = None
        self.s: I = None
        self.q: G = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: I = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.s: H = None
        self.u: F = None
        self.r: G = None
        self.t: D = None
        self.x: F = None
        self.y: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.v: B = None
        self.y: I = None
        self.p: I = None
        self.s: E = None
        self.q: F = None
        self.o: A = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: F = None
        self.y: I = None
        self.s: I = None
        self.q: G = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: B = None
        self.txt = txt

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

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