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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: E = None
        self.v: D = None
        self.p: A = None
        self.q: E = None
        self.u: C = None
        self.txt = txt

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

l = A("l")
n = B("n")
m = C("m")
c = D("c")
j = E("j")
i = F("i")
h = E("h")
d = B("d")
a = C("a")
b = D("b")

l.y = j
l.s = j
l.p = i
l.o = d
n.v = d
n.w = h
n.r = i
n.s = c
m.y = n
c.p = b
c.y = a
c.o = i
j.t = d
j.s = h
j.q = h
j.v = b
j.p = l
j.u = m
i.y = b
h.t = d
h.s = j
h.q = j
h.v = b
h.p = l
h.u = m
d.v = n
d.w = j
d.r = i
d.s = b
a.y = d
b.p = c
b.y = m
b.o = i
assert d.v.s.y.y.v.v.s.p.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.p: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.r: F = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: E = None
        self.v: D = None
        self.p: A = None
        self.q: E = None
        self.u: C = None
        self.txt = txt

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

l = A("l")
n = B("n")
m = C("m")
c = D("c")
j = E("j")
i = F("i")
h = E("h")
d = B("d")
a = C("a")
b = D("b")

l.y = j
l.s = j
l.p = i
l.o = d
n.v = d
n.w = h
n.r = i
n.s = c
m.y = n
c.p = b
c.y = a
c.o = i
j.t = d
j.s = h
j.q = h
j.v = b
j.p = l
j.u = m
i.y = b
h.t = d
h.s = j
h.q = j
h.v = b
h.p = l
h.u = m
d.v = n
d.w = j
d.r = i
d.s = b
a.y = d
b.p = c
b.y = m
b.o = i
assert d.v.s.y.y.v.v.s.p.y.y.txt == "d"