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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.r: G = None
        self.u: I = None
        self.w: D = None
        self.x: E = None
        self.q: H = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: E = None
        self.w: E = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: I = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: D = None
        self.s: F = None
        self.t: E = None
        self.u: E = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.r: A = None
        self.p: I = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.r: G = None
        self.u: I = None
        self.w: D = None
        self.x: E = None
        self.q: H = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: E = None
        self.w: E = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: A = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: I = None
        self.p: D = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: D = None
        self.s: F = None
        self.t: E = None
        self.u: E = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: A = None
        self.r: A = None
        self.p: I = None
        self.v: E = None
        self.txt = txt

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

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

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