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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: E = None
        self.r: D = None
        self.z: H = None
        self.v: F = None
        self.p: A = None
        self.u: H = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.s: I = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: F = None
        self.r: G = None
        self.o: G = None
        self.p: B = None
        self.z: D = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: E = None
        self.r: D = None
        self.z: H = None
        self.v: F = None
        self.p: A = None
        self.u: H = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.s: I = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: F = None
        self.r: G = None
        self.o: G = None
        self.p: B = None
        self.z: D = None
        self.w: G = None
        self.txt = txt

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

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