class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: I = None
        self.t: F = None
        self.p: I = None
        self.x: C = None
        self.v: J = None
        self.o: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.t: I = None
        self.w: E = 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.x: H = None
        self.t: C = None
        self.q: E = None
        self.u: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: F = None
        self.t: I = None
        self.w: E = 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.x: H = None
        self.t: C = None
        self.q: E = None
        self.u: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: D = None
        self.txt = txt

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

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

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

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