class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.o: B = None
        self.v: D = None
        self.p: E = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.t: H = None
        self.q: H = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.y: H = None
        self.x: J = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.z: E = None
        self.w: G = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: E = None
        self.p: F = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.t: H = None
        self.q: H = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.y: H = None
        self.x: J = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.z: E = None
        self.w: G = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: E = None
        self.p: F = None
        self.r: G = None
        self.u: F = None
        self.txt = txt

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

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