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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.x: I = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: B = None
        self.x: I = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

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