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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.p: A = None
        self.x: A = None
        self.v: I = None
        self.w: H = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.u: E = None
        self.v: H = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: I = None
        self.y: F = None
        self.o: F = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: A = None
        self.v: G = None
        self.y: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.v: G = None
        self.z: G = None
        self.p: E = None
        self.w: H = None
        self.r: F = None
        self.u: F = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.p: A = None
        self.x: A = None
        self.v: I = None
        self.w: H = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.w: E = None
        self.u: E = None
        self.v: H = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: I = None
        self.y: F = None
        self.o: F = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: A = None
        self.v: G = None
        self.y: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: F = None
        self.v: G = None
        self.z: G = None
        self.p: E = None
        self.w: H = None
        self.r: F = None
        self.u: F = None
        self.y: H = None
        self.txt = txt

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

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