class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: G = None
        self.r: H = None
        self.y: C = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.z: E = None
        self.v: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.p: G = None
        self.v: F = None
        self.w: C = None
        self.u: H = None
        self.txt = txt

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

j.r = a
j.u = g
e.o = g
e.z = g
e.w = c
e.r = a
e.y = l
l.z = g
l.s = g
h.w = d
h.t = e
n.u = g
d.v = g
d.y = g
d.u = c
d.w = c
d.t = n
c.t = h
c.w = h
c.p = a
c.y = n
c.o = g
c.z = g
c.s = g
c.x = d
c.q = e
a.t = n
a.u = n
a.z = n
a.v = j
a.y = e
g.z = j
g.x = n
g.p = c
g.v = d
g.w = l
g.u = a
assert e.r.v.u.p.t.t.z.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: G = None
        self.r: H = None
        self.y: C = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.z: E = None
        self.v: A = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.p: G = None
        self.v: F = None
        self.w: C = None
        self.u: H = None
        self.txt = txt

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

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