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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.q: E = None
        self.v: I = None
        self.u: I = None
        self.s: H = None
        self.t: I = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.q: E = None
        self.v: I = None
        self.u: I = None
        self.s: H = None
        self.t: I = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

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

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

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