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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: H = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: H = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

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

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

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

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