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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.s: A = None
        self.o: C = None
        self.t: C = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.txt = txt

e = A("e")
f = B("f")
h = C("h")
k = D("k")
g = E("g")
n = F("n")
a = G("a")
c = H("c")
l = H("l")
j = F("j")

e.v = h
e.x = g
f.z = g
f.q = g
f.w = j
f.s = e
f.o = h
f.t = h
f.y = a
h.w = c
h.u = f
h.r = a
k.q = a
g.z = h
n.w = g
n.p = g
n.y = a
a.w = k
a.u = c
c.v = g
c.u = f
l.v = g
l.u = f
j.w = g
j.p = g
j.y = a
assert g.z.r.w.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.s: A = None
        self.o: C = None
        self.t: C = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.txt = txt

e = A("e")
f = B("f")
h = C("h")
k = D("k")
g = E("g")
n = F("n")
a = G("a")
c = H("c")
l = H("l")
j = F("j")

e.v = h
e.x = g
f.z = g
f.q = g
f.w = j
f.s = e
f.o = h
f.t = h
f.y = a
h.w = c
h.u = f
h.r = a
k.q = a
g.z = h
n.w = g
n.p = g
n.y = a
a.w = k
a.u = c
c.v = g
c.u = f
l.v = g
l.u = f
j.w = g
j.p = g
j.y = a
assert g.z.r.w.q.u.txt == "c"