class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.t: D = None
        self.p: B = None
        self.s: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: F = None
        self.x: F = None
        self.y: G = None
        self.o: F = None
        self.r: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.w: E = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: G = None
        self.p: C = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: H = None
        self.r: D = None
        self.v: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: F = None
        self.x: F = None
        self.y: G = None
        self.o: F = None
        self.r: E = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.w: E = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: G = None
        self.p: C = None
        self.x: D = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: H = None
        self.r: D = None
        self.v: A = None
        self.txt = txt

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

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

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