class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: H = None
        self.y: G = None
        self.w: G = None
        self.r: G = None
        self.v: D = None
        self.p: H = None
        self.z: H = None
        self.o: F = None
        self.s: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.y: I = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: H = None
        self.s: H = None
        self.z: J = None
        self.r: A = None
        self.w: F = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: A = None
        self.y: I = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: H = None
        self.s: H = None
        self.z: J = None
        self.r: A = None
        self.w: F = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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