class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: B = None
        self.u: C = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: C = None
        self.t: C = None
        self.v: D = None
        self.w: C = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: C = None
        self.t: C = None
        self.v: D = None
        self.w: C = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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