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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.x: E = None
        self.u: H = None
        self.v: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.o: A = None
        self.x: A = None
        self.v: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: F = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.p: F = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

e = A("e")
n = B("n")
f = C("f")
d = D("d")
h = E("h")
a = F("a")
c = G("c")
j = H("j")
m = F("m")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.x: E = None
        self.u: H = None
        self.v: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: F = None
        self.o: A = None
        self.x: A = None
        self.v: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: F = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: G = None
        self.p: F = None
        self.q: C = None
        self.x: C = None
        self.txt = txt

e = A("e")
n = B("n")
f = C("f")
d = D("d")
h = E("h")
a = F("a")
c = G("c")
j = H("j")
m = F("m")

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