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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.y: H = None
        self.r: A = None
        self.x: G = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: F = None
        self.q: D = None
        self.txt = txt

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

j = A("j")
i = B("i")
f = C("f")
e = D("e")
b = E("b")
d = F("d")
c = G("c")
k = H("k")
g = I("g")
n = A("n")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: C = None
        self.y: H = None
        self.r: A = None
        self.x: G = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: F = None
        self.q: D = None
        self.txt = txt

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

j = A("j")
i = B("i")
f = C("f")
e = D("e")
b = E("b")
d = F("d")
c = G("c")
k = H("k")
g = I("g")
n = A("n")

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