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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.q: J = None
        self.z: I = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: E = None
        self.t: E = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: E = None
        self.q: J = None
        self.z: I = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.q: E = None
        self.t: E = None
        self.o: B = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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