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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: J = None
        self.o: E = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.q: B = None
        self.w: G = None
        self.s: F = None
        self.y: B = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: B = None
        self.p: I = None
        self.w: B = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: H = None
        self.p: I = None
        self.q: B = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: E = None
        self.s: J = None
        self.w: B = None
        self.o: F = None
        self.t: F = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: B = None
        self.v: J = None
        self.o: F = None
        self.x: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.u: E = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: J = None
        self.o: E = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: D = None
        self.q: B = None
        self.w: G = None
        self.s: F = None
        self.y: B = None
        self.p: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: B = None
        self.p: I = None
        self.w: B = None
        self.q: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: H = None
        self.p: I = None
        self.q: B = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: E = None
        self.s: J = None
        self.w: B = None
        self.o: F = None
        self.t: F = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: B = None
        self.v: J = None
        self.o: F = None
        self.x: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: I = None
        self.u: E = None
        self.x: H = None
        self.txt = txt

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

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