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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.o: G = None
        self.p: A = None
        self.u: E = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.o: C = None
        self.t: I = None
        self.u: C = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: F = None
        self.p: F = None
        self.v: I = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.o: G = None
        self.p: A = None
        self.u: E = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.o: C = None
        self.t: I = None
        self.u: C = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: F = None
        self.p: F = None
        self.v: I = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.q: F = None
        self.txt = txt

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

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

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