class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: B = None
        self.v: F = None
        self.y: E = None
        self.x: E = None
        self.p: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: E = None
        self.x: H = None
        self.u: G = None
        self.r: G = None
        self.o: G = None
        self.w: D = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: G = None
        self.z: I = None
        self.x: C = None
        self.p: D = None
        self.u: D = None
        self.v: D = None
        self.r: G = None
        self.y: F = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.o: D = None
        self.u: E = None
        self.p: J = None
        self.s: E = None
        self.t: A = None
        self.v: I = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: E = None
        self.x: H = None
        self.u: G = None
        self.r: G = None
        self.o: G = None
        self.w: D = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: G = None
        self.z: I = None
        self.x: C = None
        self.p: D = None
        self.u: D = None
        self.v: D = None
        self.r: G = None
        self.y: F = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: G = None
        self.o: D = None
        self.u: E = None
        self.p: J = None
        self.s: E = None
        self.t: A = None
        self.v: I = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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