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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: G = None
        self.p: A = None
        self.x: J = None
        self.t: G = None
        self.u: A = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: I = None
        self.w: I = None
        self.q: F = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: I = None
        self.z: B = None
        self.q: G = None
        self.t: F = None
        self.r: H = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.t: B = None
        self.r: H = None
        self.s: B = None
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: B = None
        self.o: E = None
        self.x: F = None
        self.y: D = None
        self.s: A = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: H = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: G = None
        self.p: A = None
        self.x: J = None
        self.t: G = None
        self.u: A = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: I = None
        self.w: I = None
        self.q: F = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: I = None
        self.z: B = None
        self.q: G = None
        self.t: F = None
        self.r: H = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.t: B = None
        self.r: H = None
        self.s: B = None
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: B = None
        self.o: E = None
        self.x: F = None
        self.y: D = None
        self.s: A = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: H = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

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

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