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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.y: I = None
        self.o: F = None
        self.t: F = None
        self.r: I = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: B = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: H = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.y: I = None
        self.o: F = None
        self.t: F = None
        self.r: I = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: B = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

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

k.y = l
j.u = c
j.p = h
j.t = a
j.v = l
j.y = d
a.v = c
a.r = c
a.z = d
a.q = g
f.t = c
f.w = c
f.y = l
f.s = l
f.q = h
f.u = d
f.v = b
c.z = l
c.r = d
b.z = c
b.w = j
b.u = d
l.s = j
l.v = b
l.o = b
l.t = b
l.y = h
l.r = h
l.q = c
d.s = g
d.r = l
h.s = a
h.w = j
h.p = l
h.r = k
g.t = c
g.w = c
g.y = l
g.s = l
g.q = h
g.u = d
g.v = b
assert f.q.r.y.q.r.r.s.t.z.txt == "d"