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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.q: A = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.u: A = None
        self.o: G = None
        self.q: E = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.y: E = None
        self.w: G = None
        self.x: B = None
        self.txt = txt

i = A("i")
d = B("d")
g = C("g")
b = D("b")
k = E("k")
h = F("h")
m = G("m")
l = G("l")
e = C("e")
c = A("c")

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.q: A = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: G = None
        self.u: A = None
        self.o: G = None
        self.q: E = None
        self.y: E = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.y: E = None
        self.w: G = None
        self.x: B = None
        self.txt = txt

i = A("i")
d = B("d")
g = C("g")
b = D("b")
k = E("k")
h = F("h")
m = G("m")
l = G("l")
e = C("e")
c = A("c")

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