class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: B = None
        self.z: D = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: F = None
        self.t: F = None
        self.u: G = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: F = None
        self.t: F = None
        self.u: G = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

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

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

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

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