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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.v: F = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

h.w = e
h.t = g
h.v = m
h.u = b
e.w = j
e.x = j
e.u = d
e.v = d
e.s = g
m.u = e
l.s = h
g.x = l
g.t = l
g.z = h
d.y = g
d.t = h
j.z = b
j.q = b
j.x = l
j.s = d
j.w = d
j.v = d
j.r = m
b.p = e
b.x = d
c.q = b
assert g.z.w.s.x.s.u.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: E = None
        self.v: C = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.v: F = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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