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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.r: B = None
        self.w: C = None
        self.t: A = None
        self.p: A = None
        self.y: H = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.r: B = None
        self.w: C = None
        self.t: A = None
        self.p: A = None
        self.y: H = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

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

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