class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.o: F = None
        self.p: H = None
        self.w: D = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: C = None
        self.s: A = None
        self.t: G = None
        self.o: E = None
        self.z: H = None
        self.r: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.v: E = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.s: I = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: A = None
        self.o: F = None
        self.p: H = None
        self.w: D = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: C = None
        self.s: A = None
        self.t: G = None
        self.o: E = None
        self.z: H = None
        self.r: D = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.v: E = None
        self.z: C = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.s: I = None
        self.o: A = None
        self.txt = txt

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

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

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