class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: B = None
        self.y: D = None
        self.z: D = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: H = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.p: C = None
        self.w: A = None
        self.z: I = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: H = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.o: H = None
        self.w: H = None
        self.y: H = None
        self.txt = txt

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

f.s = e
f.o = e
f.t = d
f.w = d
f.y = j
f.z = j
d.u = g
d.o = m
d.t = f
d.s = f
i.y = c
i.o = j
i.r = d
i.x = m
i.z = g
j.z = d
j.u = d
j.p = m
j.v = e
j.w = k
c.x = j
c.r = j
c.y = j
c.p = i
c.w = f
c.z = g
e.o = d
e.p = m
e.t = g
k.p = f
k.x = e
k.z = j
m.s = i
m.q = c
m.o = e
m.w = j
m.z = d
m.t = g
g.q = k
g.x = f
g.o = m
g.w = m
g.y = m
assert k.x.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: B = None
        self.y: D = None
        self.z: D = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: H = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.p: C = None
        self.w: A = None
        self.z: I = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: H = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.o: H = None
        self.w: H = None
        self.y: H = None
        self.txt = txt

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

f.s = e
f.o = e
f.t = d
f.w = d
f.y = j
f.z = j
d.u = g
d.o = m
d.t = f
d.s = f
i.y = c
i.o = j
i.r = d
i.x = m
i.z = g
j.z = d
j.u = d
j.p = m
j.v = e
j.w = k
c.x = j
c.r = j
c.y = j
c.p = i
c.w = f
c.z = g
e.o = d
e.p = m
e.t = g
k.p = f
k.x = e
k.z = j
m.s = i
m.q = c
m.o = e
m.w = j
m.z = d
m.t = g
g.q = k
g.x = f
g.o = m
g.w = m
g.y = m
assert k.x.o.u.txt == "g"