class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: J = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: G = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.p: B = None
        self.s: D = None
        self.q: E = None
        self.y: B = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: E = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: J = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: G = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: E = None
        self.p: B = None
        self.s: D = None
        self.q: E = None
        self.y: B = None
        self.w: I = None
        self.txt = txt

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

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