class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: F = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

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

j = A("j")
k = B("k")
f = C("f")
b = D("b")
g = E("g")
c = F("c")
d = E("d")
e = F("e")
h = B("h")

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: F = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

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

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

j = A("j")
k = B("k")
f = C("f")
b = D("b")
g = E("g")
c = F("c")
d = E("d")
e = F("e")
h = B("h")

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