class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.z: G = None
        self.p: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.p: H = None
        self.w: A = None
        self.z: D = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: D = None
        self.p: H = None
        self.w: A = None
        self.z: D = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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