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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.q: H = None
        self.z: I = None
        self.v: B = None
        self.u: H = None
        self.txt = txt

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

l.u = k
l.z = n
f.v = n
h.s = c
h.r = c
k.s = g
k.u = a
k.o = l
g.x = f
g.u = f
g.s = a
g.t = a
g.v = c
g.q = k
g.p = i
g.y = n
g.r = m
a.q = m
a.t = f
n.q = m
i.t = k
c.t = f
m.p = n
m.s = f
m.v = f
m.q = i
m.u = i
m.z = c
assert g.r.p.q.s.v.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: B = None
        self.q: H = None
        self.z: I = None
        self.v: B = None
        self.u: H = None
        self.txt = txt

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

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