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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.s: F = None
        self.txt = txt

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

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

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

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