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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.w: A = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.w: G = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

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

g = A("g")
e = B("e")
d = C("d")
m = D("m")
b = E("b")
i = F("i")
l = G("l")
h = H("h")

g.z = e
g.w = h
g.x = l
g.p = b
g.r = i
e.u = b
e.t = i
e.s = i
e.w = g
e.o = m
d.s = e
d.z = g
d.t = m
d.x = i
d.w = b
d.p = b
d.o = b
d.r = h
m.v = b
m.u = g
m.t = g
b.v = e
i.t = e
i.u = m
i.z = m
i.w = l
i.r = h
l.z = b
l.o = i
l.u = i
h.o = g
h.p = e
assert g.p.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: H = None
        self.x: G = None
        self.p: E = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.w: A = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.w: G = None
        self.r: H = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: F = None
        self.u: F = None
        self.txt = txt

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

g = A("g")
e = B("e")
d = C("d")
m = D("m")
b = E("b")
i = F("i")
l = G("l")
h = H("h")

g.z = e
g.w = h
g.x = l
g.p = b
g.r = i
e.u = b
e.t = i
e.s = i
e.w = g
e.o = m
d.s = e
d.z = g
d.t = m
d.x = i
d.w = b
d.p = b
d.o = b
d.r = h
m.v = b
m.u = g
m.t = g
b.v = e
i.t = e
i.u = m
i.z = m
i.w = l
i.r = h
l.z = b
l.o = i
l.u = i
h.o = g
h.p = e
assert g.p.v.u.txt == "b"