class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.p: G = None
        self.z: E = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: F = None
        self.v: D = None
        self.x: I = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: C = None
        self.s: I = None
        self.v: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: E = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.y: D = None
        self.z: G = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.p: G = None
        self.z: E = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: F = None
        self.v: D = None
        self.x: I = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: C = None
        self.s: I = None
        self.v: A = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: E = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: G = None
        self.y: D = None
        self.z: G = None
        self.o: D = None
        self.txt = txt

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

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