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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: A = None
        self.q: D = None
        self.s: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: A = None
        self.q: D = None
        self.s: F = None
        self.z: E = None
        self.txt = txt

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

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