class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: E = None
        self.s: G = None
        self.y: G = None
        self.p: G = None
        self.v: E = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.r: C = 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.p: I = None
        self.v: E = None
        self.w: A = None
        self.r: H = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: I = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: I = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.r: C = 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.p: I = None
        self.v: E = None
        self.w: A = None
        self.r: H = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: I = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: I = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

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

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