class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: H = None
        self.q: F = None
        self.z: E = None
        self.o: C = None
        self.p: D = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.y: C = None
        self.x: I = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: A = None
        self.x: G = None
        self.z: I = None
        self.v: I = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.u: G = None
        self.v: F = None
        self.o: J = None
        self.w: G = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.o: F = None
        self.q: H = None
        self.x: J = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.y: C = None
        self.x: I = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: A = None
        self.x: G = None
        self.z: I = None
        self.v: I = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: G = None
        self.u: G = None
        self.v: F = None
        self.o: J = None
        self.w: G = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.o: F = None
        self.q: H = None
        self.x: J = None
        self.w: J = None
        self.txt = txt

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

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

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

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

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