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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: A = None
        self.v: G = None
        self.s: D = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.y: E = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: A = None
        self.v: G = None
        self.s: D = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: E = None
        self.y: E = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

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

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

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