class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: I = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: F = None
        self.s: G = None
        self.v: G = None
        self.w: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: I = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: F = None
        self.s: G = None
        self.v: G = None
        self.w: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: B = None
        self.txt = txt

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

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

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