class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: C = None
        self.x: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.q: A = None
        self.u: I = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.q: A = None
        self.u: I = None
        self.o: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: H = None
        self.w: A = None
        self.txt = txt

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

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