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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: F = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.w: E = None
        self.r: E = None
        self.o: D = None
        self.txt = txt

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

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

h.p = j
h.v = j
h.t = j
h.w = n
h.u = b
h.z = k
h.r = k
k.o = i
n.y = e
n.z = c
n.x = j
i.o = n
i.p = n
i.y = b
j.q = c
c.y = h
c.w = e
b.p = n
b.x = e
b.w = j
b.r = j
b.o = i
e.z = b
e.r = b
e.v = c
e.t = j
e.w = n
assert j.q.w.v.y.z.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: C = None
        self.u: G = None
        self.v: E = None
        self.z: B = None
        self.r: B = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: F = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: G = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.w: E = None
        self.r: E = None
        self.o: D = None
        self.txt = txt

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

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

h.p = j
h.v = j
h.t = j
h.w = n
h.u = b
h.z = k
h.r = k
k.o = i
n.y = e
n.z = c
n.x = j
i.o = n
i.p = n
i.y = b
j.q = c
c.y = h
c.w = e
b.p = n
b.x = e
b.w = j
b.r = j
b.o = i
e.z = b
e.r = b
e.v = c
e.t = j
e.w = n
assert j.q.w.v.y.z.o.y.txt == "b"