class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.t: E = None
        self.v: D = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.x: D = None
        self.u: D = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.y: A = None
        self.q: D = None
        self.txt = txt

g = A("g")
j = B("j")
a = C("a")
e = D("e")
c = E("c")
i = F("i")
f = D("f")
n = B("n")
k = C("k")

g.y = e
g.v = e
g.w = i
g.t = c
g.x = j
g.o = f
j.w = g
j.r = k
j.q = k
j.x = e
j.u = f
j.t = n
a.v = k
a.x = g
e.u = i
c.w = n
c.q = i
c.y = k
i.s = g
i.y = g
i.z = c
i.q = f
f.u = i
n.w = g
n.r = a
n.q = a
n.x = e
n.u = f
n.t = j
k.v = a
k.x = g
assert c.y.v.x.t.q.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.t: E = None
        self.v: D = None
        self.x: B = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: C = None
        self.x: D = None
        self.u: D = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: F = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: E = None
        self.y: A = None
        self.q: D = None
        self.txt = txt

g = A("g")
j = B("j")
a = C("a")
e = D("e")
c = E("c")
i = F("i")
f = D("f")
n = B("n")
k = C("k")

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