class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: D = None
        self.u: J = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: H = None
        self.t: J = None
        self.w: F = None
        self.s: J = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.t: B = None
        self.w: G = None
        self.x: D = None
        self.u: I = None
        self.o: E = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.v: G = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

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

b = A("b")
i = B("i")
l = C("l")
d = D("d")
f = E("f")
n = F("n")
g = G("g")
h = H("h")
k = I("k")
a = J("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: H = None
        self.t: J = None
        self.w: F = None
        self.s: J = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.t: B = None
        self.w: G = None
        self.x: D = None
        self.u: I = None
        self.o: E = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.v: G = None
        self.o: B = None
        self.t: A = None
        self.txt = txt

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

b = A("b")
i = B("i")
l = C("l")
d = D("d")
f = E("f")
n = F("n")
g = G("g")
h = H("h")
k = I("k")
a = J("a")

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