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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: I = None
        self.t: B = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: I = None
        self.t: B = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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