class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.w: G = None
        self.r: D = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: G = None
        self.r: B = None
        self.s: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.r: B = None
        self.p: A = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: G = None
        self.r: B = None
        self.s: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: C = None
        self.r: B = None
        self.p: A = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

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