class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: D = None
        self.t: G = None
        self.y: H = None
        self.v: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: H = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.r: E = None
        self.y: H = None
        self.t: C = None
        self.s: E = None
        self.z: E = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: H = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: H = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: E = None
        self.r: E = None
        self.y: H = None
        self.t: C = None
        self.s: E = None
        self.z: E = None
        self.x: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: H = None
        self.t: F = None
        self.o: E = None
        self.txt = txt

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

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