class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: D = None
        self.t: B = None
        self.w: C = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: G = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: J = None
        self.t: F = None
        self.u: C = None
        self.w: I = None
        self.z: C = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: J = None
        self.r: I = None
        self.q: I = None
        self.w: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: G = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: A = None
        self.s: E = None
        self.t: C = None
        self.q: A = None
        self.r: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: G = None
        self.p: G = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: J = None
        self.t: F = None
        self.u: C = None
        self.w: I = None
        self.z: C = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: J = None
        self.r: I = None
        self.q: I = None
        self.w: H = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.o: G = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: A = None
        self.s: E = None
        self.t: C = None
        self.q: A = None
        self.r: C = None
        self.p: E = None
        self.txt = txt

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

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