class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: B = None
        self.u: D = None
        self.x: G = None
        self.r: C = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.o: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.s: H = None
        self.u: G = None
        self.txt = txt

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

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

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

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