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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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