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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

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

c = A("c")
l = B("l")
h = C("h")
a = D("a")
i = E("i")
b = F("b")
g = G("g")
n = E("n")
k = C("k")
f = G("f")

c.w = k
c.u = a
l.u = h
l.x = a
h.o = g
h.y = g
h.u = g
h.t = a
a.v = c
a.x = n
a.r = b
i.y = a
i.z = n
i.o = k
b.s = f
b.o = a
b.v = g
b.r = k
g.u = a
g.y = c
n.y = a
n.z = i
n.o = h
k.o = f
k.y = g
k.u = g
k.t = a
f.u = a
f.y = c
assert n.z.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.v: G = None
        self.r: C = None
        self.txt = txt

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

c = A("c")
l = B("l")
h = C("h")
a = D("a")
i = E("i")
b = F("b")
g = G("g")
n = E("n")
k = C("k")
f = G("f")

c.w = k
c.u = a
l.u = h
l.x = a
h.o = g
h.y = g
h.u = g
h.t = a
a.v = c
a.x = n
a.r = b
i.y = a
i.z = n
i.o = k
b.s = f
b.o = a
b.v = g
b.r = k
g.u = a
g.y = c
n.y = a
n.z = i
n.o = h
k.o = f
k.y = g
k.u = g
k.t = a
f.u = a
f.y = c
assert n.z.z.z.txt == "i"