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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: E = None
        self.y: E = None
        self.p: E = None
        self.q: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: E = None
        self.y: E = None
        self.p: E = None
        self.q: B = None
        self.v: C = None
        self.txt = txt

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

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

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

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