class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: F = None
        self.z: G = None
        self.y: F = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

b = A("b")
j = B("j")
i = C("i")
c = D("c")
e = E("e")
h = F("h")
d = G("d")
a = H("a")
f = B("f")
l = E("l")

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

b = A("b")
j = B("j")
i = C("i")
c = D("c")
e = E("e")
h = F("h")
d = G("d")
a = H("a")
f = B("f")
l = E("l")

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