class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: H = None
        self.p: E = None
        self.r: E = None
        self.q: D = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: G = None
        self.q: F = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.p: A = None
        self.r: A = None
        self.o: D = None
        self.q: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: G = None
        self.q: F = None
        self.p: B = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.p: A = None
        self.r: A = None
        self.o: D = None
        self.q: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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