class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: G = None
        self.y: G = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.z: G = None
        self.v: I = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.v: A = None
        self.w: H = None
        self.x: B = None
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: H = None
        self.z: G = None
        self.v: I = None
        self.r: I = None
        self.y: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: D = None
        self.v: A = None
        self.w: H = None
        self.x: B = None
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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