class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: C = None
        self.r: C = None
        self.s: B = None
        self.q: B = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.o: H = None
        self.s: B = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: G = None
        self.u: E = None
        self.s: B = None
        self.r: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: H = None
        self.v: A = None
        self.x: A = None
        self.r: A = None
        self.s: B = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: D = None
        self.o: H = None
        self.s: B = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: G = None
        self.u: E = None
        self.s: B = None
        self.r: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: H = None
        self.v: A = None
        self.x: A = None
        self.r: A = None
        self.s: B = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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