class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: E = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: G = None
        self.r: D = None
        self.x: C = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: B = None
        self.u: E = None
        self.p: E = None
        self.q: F = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: A = None
        self.w: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: G = None
        self.r: D = None
        self.x: C = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: B = None
        self.u: E = None
        self.p: E = None
        self.q: F = None
        self.s: B = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: A = None
        self.w: G = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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