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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.o: I = None
        self.z: F = None
        self.y: D = None
        self.u: B = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: H = None
        self.z: G = None
        self.r: H = None
        self.t: A = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.t: I = None
        self.q: E = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: B = None
        self.s: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: E = None
        self.s: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: D = None
        self.o: I = None
        self.z: F = None
        self.y: D = None
        self.u: B = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: H = None
        self.z: G = None
        self.r: H = None
        self.t: A = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.t: I = None
        self.q: E = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: B = None
        self.s: C = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: E = None
        self.s: H = None
        self.txt = txt

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

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