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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: C = None
        self.txt = txt

c = A("c")
i = B("i")
l = C("l")
e = D("e")
d = E("d")
a = F("a")
f = G("f")
g = H("g")
k = D("k")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: A = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: C = None
        self.txt = txt

c = A("c")
i = B("i")
l = C("l")
e = D("e")
d = E("d")
a = F("a")
f = G("f")
g = H("g")
k = D("k")

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