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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: E = None
        self.x: H = None
        self.y: G = None
        self.u: G = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.t: F = None
        self.s: H = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.p: G = None
        self.w: H = None
        self.r: H = None
        self.txt = txt

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

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

j = A("j")
g = B("g")
k = C("k")
c = D("c")
e = E("e")
i = F("i")
a = G("a")
h = H("h")
m = G("m")
f = A("f")

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: E = None
        self.x: H = None
        self.y: G = None
        self.u: G = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.t: F = None
        self.s: H = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.p: G = None
        self.w: H = None
        self.r: H = None
        self.txt = txt

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

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

j = A("j")
g = B("g")
k = C("k")
c = D("c")
e = E("e")
i = F("i")
a = G("a")
h = H("h")
m = G("m")
f = A("f")

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