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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.z: F = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: H = None
        self.z: F = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

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