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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: F = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.u: B = None
        self.r: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: F = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: B = None
        self.u: B = None
        self.r: I = None
        self.txt = txt

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

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

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