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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: D = None
        self.u: G = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.s: D = None
        self.o: E = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: D = None
        self.u: G = None
        self.q: A = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.s: D = None
        self.o: E = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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